div{
    margin:10px;
    padding:5px;
}
#father{
    /*方法一：增加父级元素的高度*/
    border:1px #000 solid;
    /*height:800px;*/
    /*方法三：在父级元素中添加一个overflow属性*/
    /*overflow: hidden;*/
}
/*方法四：父类添加一个伪类：after*/
/*father:after{
    content:'';
    display:block;
    clear:both;
}*/
.layer01{
    border:1px #F00 dashed;
    display:inline-block;
    float:right;
}
.layer02{
    border:1px #00F dashed;
    display:inline-block;
    float:right;
}
.layer03{
    border:1px #060 dashed;
    display:inline-block;
    float:right;
}
/*
clear:right;右侧不允许又浮动元素
clear:left;左侧不允许又浮动元素
clear:both;两侧不允许又浮动元素
clear:none;
*/
.layer04{
    border:1px #666 dashed;
    font-size:12px;
    line-height:23px;
    display:inline-block;
    float:right;
    clear:both;
}
/*方法二:在浮动元素后面增加一个空的div标签清除浮动*/
/*
.clear{
	clear:both;
	margin:0;
	padding:0;
}
*/